function getClientInfo() {
  return {
    "name": "歌词-粘贴所选音符歌词(按字符隔开)",
    "category": "AKD",
    "author": "akd",
    "versionNumber": 1,
    "minEditorVersion": 65540
  };
}

function main() {
  var selection = SV.getMainEditor().getSelection();
  var selectedNotes = selection.getSelectedNotes();
  var Lyrics = SV.getHostClipboard()
  var j = 0
  if (Lyrics) {
    var lrcs = Lyrics.split("")
    for (var i = 0; i < selectedNotes.length; ) {
      if (selectedNotes[i].getLyrics() == "-") {
        i++
        continue
      }
      if (lrcs[j] == " " || lrcs[j] == "\t" || lrcs[j] == "\n" || lrcs[j] == "\r") {
        j++
        continue
      }
      selectedNotes[i].setLyrics(lrcs[j]);
      i++
      j++
      if (j >= lrcs.length) { j = 0 }
    }
  }
  SV.finish();
}